﻿<?php
        ob_clean();

      $per_page =5;//固定每页显示的记录数
      $cur_page = empty($_GET['p'])?1:$_GET['p'];//获取地址栏的页码参数，当前访问的页面
      $offset = ($cur_page-1)*$per_page; //求出当前limit的偏移量
      $paget = getPages($link,'admin',$per_page,$cur_page);//调用翻页函数



      $id = !empty($_GET['id'])?$_GET['id']:0;
      $sql = "select * from `admin` where `id` = 49";
      $result = mysqli_query($GLOBALS['link'],$sql);
            // print_r($result);die;
      $cate = array();
      while($data=mysqli_fetch_assoc($result)){
        $cate[]=$data;
      }

      if (!empty($_SERVER['HTTP_X_REQUESTED_WITH'])) {
          echo json_encode($cate);
          die;
      }


     //视图加载页面
    include (VIEW_LAYER.'/admin/layout.html');

?>


